package logic.table;

import android.provider.BaseColumns;
import android.util.Log;

import logic.constants.DefaultConsts;

/**
 * 全国省市区县信息表
 * @author 刘宾  
 * @date 2015年4月7日 下午1:55:40
 */
public class AreaTable
{
	public static final String table         = "lq_area";
	
	public final class AreaColumns
	        implements
	        BaseColumns
	{
		public final static String COLUMN_ID = "id";
		public final static String PARENT_ID = "parentId";
		public final static String AREA_NAME = "areaName";
		public final static String AREA_TYPE = "areaType";
	}
	
	public static String getCreateTableSQL() {
		StringBuilder sb = new StringBuilder();
		sb.append("CREATE TABLE IF NOT EXISTS " + table + "(");
		
		sb.append(AreaColumns.COLUMN_ID + " INTEGER,");
		sb.append(AreaColumns.PARENT_ID + " INTEGER,");
		sb.append(AreaColumns.AREA_NAME + " TEXT, ");
		sb.append(AreaColumns.AREA_TYPE + " INTEGER");
		sb.append(");");
		Log.d(DefaultConsts.TAG, table + ":" + sb.toString());
		return sb.toString();
	}
}
